﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using DAL;
using Models;

namespace BLL
{
   public class CartBLL
    {
        //购物车添加
        public static bool cartAddBLL(Cart c) {
            return CartDAL.cartAdd(c)>0;
        }
        //购物车查询
        public static DataTable cartCKBll(int id) {
            return CartDAL.cartCK(id);
        }
        //购物车总价
        public static object totalBLL(int id) {
            return CartDAL.totalDAL(id);
        }
        //购物车中的商品
        public static object jjspBLL(int id) {
            return CartDAL.jjsp(id);
        }
        //根据id删除购物车中的商品
        public static int delIDBLL(int id) {
            return CartDAL.delID(id);
        }
        //美食id
        public static object meiIDBLL(int id) {
            return CartDAL.meiID(id);
        }
        //删除购物车里的内容
        public static int deleteAllBLL(int id) {
            return CartDAL.deleteAll(id);
        }
        //购物车里面美食的数量
        public static object numIDBLL(int id) {
            return CartDAL.numID(id);
        }
    }
}
